home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / h2c.lha / h2c.doc < prev    next >
Text File  |  1998-06-17  |  5KB  |  146 lines

  1. Short:    Convert #rrggbb <-> HTML color names
  2. Author:   Gabriele Favrin (favrin@tin.it)
  3. Requires: Kickstart 2.04 or better
  4. Version:  1.0
  5.  
  6.  
  7. LEGAL STUFF
  8.    The author is in no way responsible for moral and/or material damages that
  9.    his program may cause to people or things. The programmer gave his best
  10.    to limit the problems that this tool may cause, but he is not able to
  11.    guarantee its efficiency in all the situations. Using this program, you,
  12.    the user, are responsible for all moral, material, civil and penal things.
  13.  
  14.  
  15. WHAT DOES IT DO
  16.    h2c stands for "html to color", "hex to color" which ever you prefer to
  17.    help you remember the name. It is a program that convert HTML color names
  18.    to their respective #rrggbb hex values and vice versa.
  19.  
  20.    The use of color names instead of #rrggbb values has been spread by PC
  21.    browser developers and you know how some people think... "if it works on
  22.    MY browser it will work on any". This is false: if a browser
  23.    doesn't support a color name it will ignore the color definition
  24.    and this can create problems with the page readability.
  25.  
  26.    Although all major browsers now support a large set of color name
  27.    definitions it is still a good idea to use rgb values, at least for pages
  28.    that will be spread over the net.
  29.  
  30.    On the other hand, while developing is easier to remember a string
  31.    like "yellow" than one like "#FFFF00". :-)
  32.  
  33.    h2c was born exactly for this reason: while I edit I often use color
  34.    names, then I convert them to #rrggbb values at end of my work. It was
  35.    boring to search the loooong table every time (there are 744 color
  36.    names!) so I decided to write something that does that task for me.
  37.  
  38.  
  39. USAGE
  40.    h2c can be run only from shell.
  41.  
  42.    Available options are:
  43.  
  44.    COLOR,LS=LIST/S,NA=NOALIAS/S,S=STRICT/S:
  45.  
  46.    COLOR
  47.      This option allows you to specify a color name or #rrggbb hex code.
  48.      In case of color name the matching hex value will be displayed.
  49.      If a hex value is given, h2c will display all color names matching that
  50.      value (ie. the name and its aliases).
  51.  
  52.      To specify an #rrggbb hex code, put character # or $ before the value
  53.      itself (some shell like csh have problem with "#" character, they
  54.      interpret it as a wildcard, in these cases use $).
  55.  
  56.      Note: HTML color names may contain spaces. h2c (and most browsers)
  57.      will remove them. Also capital characters are changed.
  58.  
  59.    LIST or LS
  60.      This option shows a list of all color names and their hex values.
  61.  
  62.    NOALIAS or NA
  63.      This option causes both LIST and search functions to return only a
  64.      single match for each color (ie. no multiple names for the same color
  65.      value).
  66.  
  67.    STRICT or S
  68.      This option causes h2c to recognize only the few colors officially
  69.      defined by W3C (the group that develops HTML).
  70.  
  71.    h2c can be stopped by pressing control+c.
  72.  
  73.    The results are showed as a list composed of one or more items
  74.    displayed in the following format:
  75.  
  76.    html color name    #rrggbb hex value   type
  77.  
  78.    types:
  79.  
  80.    W3C HTML - the color has been officially defined.
  81.    NHTML    - the color has been defined in some browsers (like Netscape).
  82.    ALIAS    - the color is an alias of another color name.
  83.               For example all colors containing the "grey" word are aliases
  84.               of colors containing the "gray" word.
  85.  
  86.    Examples:
  87.  
  88.    -> h2c LIST
  89.    display the entire color table.
  90.  
  91.    -> h2c LIST NOALIAS
  92.    display the color table except aliases.
  93.  
  94.    -> h2c $ffffff
  95.    display all colors names that represents the color value $ffffff
  96.  
  97.    -> h2c $ffffff STRICT
  98.    display only "white", that is the officially defined color name for value
  99.    $ffffff
  100.  
  101.    -> h2c #ffffff STRICT
  102.    the same as above but using the proper HTML way of specifying numeric values.
  103.  
  104.  
  105. THANKS and CREDITS
  106.    This program is based on the AWeb color table.
  107.    Thanks to Yvon Rozijn for it!
  108.  
  109.  
  110. FUTURE
  111.    Any suggestions, bug reports or critics are welcome! Write me at:
  112.  
  113.    E-Mail:   favrin@tin.it
  114.    FidoNet:  2:333/726.8
  115.  
  116.    Please write in italian or english, thank you.
  117.  
  118.    Visit my new Home Page:
  119.    http://freeweb.aspide.it/free/poing/index.htm
  120.  
  121.  
  122. HISTORY
  123.    V0.1 (8.3.98)
  124.     +First version.
  125.  
  126.    V1.0 (11.3.98)
  127.     +Almost rewritten the program :-)
  128.     +Reduced executable size by over 8k and improved search speed by changing
  129.      the way color data is stored.
  130.     +Now it is possible to use $ for specifying that the inserted HTML color
  131.      is an hex value. This has been added to avoid confusion (for shells)
  132.      between # and an wildcard.
  133.     +Changed 'FILTER' to 'NOALIAS' and improved its functionality.
  134.     +Various other internal changes.
  135.  
  136.  
  137. CHILDWARE
  138.    This software is "CHILDWARE". The author explicitly asks whoever uses
  139.    this program to make a donation to a beneficial corporate body which
  140.    works helping children in some way.
  141.  
  142.    If you don't know of any, ask at your local post office and inform
  143.    yourself on how to make a donation to UNICEF.
  144.  
  145.    The amount of the offer is up to you , but please do it!
  146.